﻿<Window x:Class="WpfDownload.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Asynchronous Downloader" Height="350" Width="725">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="120" />
			<RowDefinition Height="85" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<TextBox Grid.Row="0" Name="txtUriList" AcceptsReturn="True"  TextWrapping="Wrap">


			http://www.c-sharpcorner.com/UploadFile/dpatra/1935/Default.aspx          
            http://social.msdn.microsoft.com/Search/en-US?query=Concurrent+Collections
            http://msdn.microsoft.com/en-us/library/ms742157.aspx
            http://blogs.msdn.com/b/mikehillberg/archive/2009/03/20/icommand-is-like-a-chocolate-cake.aspx

		</TextBox>
		<GroupBox  Grid.Row="1" >
			<Grid Name="secendRowGrid" Margin="4">
				<Grid.RowDefinitions>
					<RowDefinition Height="30" />
					<RowDefinition Height="30" />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="38" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="80" />
					<ColumnDefinition Width="80" />
				</Grid.ColumnDefinitions>

				<Label Content="To:" Grid.Column="0" VerticalAlignment="Center" />
				<TextBox Name="txtDestination"  Grid.Column="1" VerticalAlignment="Center" />
				<Button Grid.Column="2" Content="..." Click="SelectDestinationFolder" ToolTip="Select a location" Margin="2" />
				<Button Grid.Column="3" Content="About" Click="ShowAboutBox" ToolTip="Show me your appreciations" Margin="2" />
				<Button Content="Download" Grid.Column="3" Grid.Row="1" Name="btnDownload" Click="btnDownload_Click"  Margin="2"/>


				<Label Content="Prefix:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
				<TextBox Name="txtPrefix" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" />
			</Grid>
		</GroupBox>
		<ListView x:Name="lbTasks" 
                 ItemsSource="{Binding ItemsList}" 
                  Grid.ColumnSpan="4" Grid.Row="2">

			<ListView.View>
				<GridView>
					<GridViewColumn Width="50" Header="Prefix" DisplayMemberBinding="{Binding Record.Prefix}" />
					<GridViewColumn Width="120" Header="File Name" DisplayMemberBinding="{Binding Record.FileName}" />
					<GridViewColumn Width="500" Header="Status" DisplayMemberBinding="{Binding Record.Status}" />
				</GridView>
			</ListView.View>
		</ListView>

	</Grid>
</Window>
